﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GregsList.Models
{
    public class User
    {
        public string Name { get; set; }
        public string Email { get; set; }

        private int userID;

        public int UserID
        {
            get { return userID; }
        }
        
        private static int NextUserID=0;
        
        public List<int> PostIDs = new List<int>();

        public void AddPostID(int id) 
        {
            PostIDs.Add(id);
        }

        //Default Constructor
        public User(string name, string email)
        {
            this.Name = name;
            this.Email = email;
            userID = NextUserID;
            NextUserID++;
        }

    }
}